/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package billing;

import java.util.HashMap;
import java.util.Vector;

/**
 *
 * @author apple
 */
public class UserModel extends My_Model{
    String id;
    String full_name;
    String user_name;
    String password;
    String type;
    
    public UserModel() throws Exception{
        this.tableName = "user";
    }
    

    @Override
    public My_Model to_model(HashMap<String, String> data) throws Exception {
        UserModel model = new UserModel();
        model.id = (data.get("id") != null ) ? data.get("id") : "";
        model.full_name = (data.get("full_name") != null ) ? data.get("full_name") : "";
        model.user_name = (data.get("user_name") != null ) ? data.get("user_name") : "";
        model.password = (data.get("password") != null ) ? data.get("password") : "";
        model.type = (data.get("type") != null ) ? data.get("type") : "";
        
        return model;
    }

}
